package com.tjetc._1enum;

public class _5EnumImplements {
    public static void main(String[] args) {
        C c = A.B;
        c.f();
        A.B.f1();

    }
}



enum A implements C{
    B {
        @Override
        void f1() {
            System.out.println("f1执行");
        }
    },
    D {
        @Override
        void f1() {

        }
    };

    @Override
    public void f() {
        System.out.println("f执行");
    }

    abstract void f1();
}

interface C {
    void f();
}